(1) Field of the Invention
The present invention relates to picture coding apparatuses and picture coding methods, and particularly to a picture coding apparatus and a picture coding method for decoding a coded picture stream coded by predictive coding, and re-coding the decoded picture data using a predetermined predictive coding method.
(2) Description of the Related Art
In recent years, the digitalization of AV information is advancing, and the devices that can handle picture signals by digitalization are becoming widely popular. Since the amount of information included in a picture signal is large, it is common practice to perform coding while reducing the amount of information, in consideration of recording capacity and transmission efficiency. As coding techniques for picture signals, international standards such as MPEG-2 and H.264 (MPEG-4 AVC) are established.
In these standards, a picture is coded using an I-picture on which intra-picture prediction is used without performing prediction on the time axis, a P-picture that allows prediction from one reference picture on the time axis, and a B picture that allows prediction from an interpolated picture of two pictures on the time axis. An interpolated picture can be obtained by calculating an average of pixel values of a predetermined area of two reference pictures. It should be noted that, hereinafter, both a frame in the progressive method of coding and a field in the interlaced method of coding shall be shall be generically called a “picture”.
In H.264, the B-picture which was not previously used as a reference picture, can be assumed as a picture that can be referred to (Br-picture), thus realizing an improvement in coding efficiency.
FIG. 1 is a diagram showing an example of the reference relationship of B-pictures in the case where Br-pictures are not used in coding according to the progressive method. Furthermore, FIG. 2 is a diagram showing an example of the reference relationship of B pictures in the case where Br-pictures are used in coding according to the progressive method. In MPEG-1 and MPEG-2, Br-pictures do not exist and only the reference relation in FIG. 1 is considered. As shown in FIG. 1, in the case where Br-pictures are not used, a B picture refers to only a preceding and following P-picture (or a preceding and following I-picture and P-picture). However, in the case where Br-pictures can be used, as shown in FIG. 2, a B picture can refer to two the P-pictures (or I-picture and P-picture) preceding and following it, and to the Br-picture.
Although H.264 allows the selection of a reference picture with which coding efficiency is higher, since Br-pictures can be used, managing the reference picture memory and the process of selecting a reference picture that allows highly efficient coding is complex. Conventionally, an example in which the display order is P→Br→Br→P, and an example in which the display order is P→Br→B→P are given as examples of picture types in the case of using Br-pictures. Hereinafter, the case of coding so that the display order becomes P→Br→Br→P in the field picture structure shall be described. FIG. 3 is a diagram showing an example of the reference relationship in the case of coding in the field picture structure so that the display order becomes P→Br→Br→P. In a case such as this where Br-pictures can be used, the reference relationship becomes complex since each picture can use several pictures as a reference picture, unlike in the conventional case. For example, the Br-picture which is the first field of the third frame can refer to the field pair in the first P-frame, the field pair in the second Br-frame, and the field pair in the fourth P-frame. Specifically, the Br-picture which is the first field of the third frame can select, on a macroblock basis, the reference picture with which coding efficiency will be highest, from among the six fields. Furthermore, the Br-picture which is the second field of the third frame can refer to the first field of the third Br-frame, in addition to the field pair in the
first P-frame, the field pair in the second Br-frame, and the field pair in the fourth P-frame. Therefore, this means that the Br-picture which is the second field of the third frame is able to select, on a macroblock basis, the reference picture with which coding efficiency will be highest, from among seven fields. For this reason, although the encoder or decoder is able to generate a moving picture coded stream of high picture quality with a small coding amount, since all the pictures that may possibly be referred to need to be stored in the reference picture memory, there is the problem that, over and above the need for a reference picture memory with a large storage capacity, memory management for the reference picture memory becomes complex.
As such, by placing a constraint on reference relationships, it is possible to facilitate the memory management and configuration of the encoder or decoder, and obtaining coded stream compatibility becomes easy.
For example, it is possible to place the following constraint so as to reduce the number of fields that can be referred to: “In the case of the progressive method, a Br-picture can refer to the I-frame or P-frame located nearest in a forward or backward direction in reproduction order. In the case of the interlaced method, a Br-picture can only refer to the field pair included in the nearest I-frame or P-frame located forward and backward in reproduction order, as well as only the other Br-picture of the field pair in the same Br-frame; and cannot refer to the other Br-pictures”. FIG. 4 is a diagram showing an example of the reference relationship of a Br-picture in the case where a constraint is placed on the reference relationship for a Br-picture. By placing a constraint such as that described above, the Br-picture which is a first field of the third frame can only refer to the field pairs of the two P-frames located ahead and behind, as shown in FIG. 4. Therefore, two reference pictures are eliminated, and the Br-picture which is the first field of the third frame can select a reference picture from the four P-picture fields. Furthermore, the Br-picture which is the second field of the third frame can only refer to the field pairs of the two P-frames located ahead and behind, and the first field in the same frame to which it belongs. With this, two reference pictures are eliminated, and the Br-picture which is the second field of the third frame can select, from among the five fields, a reference picture with which coding efficiency will be highest. With this, the complexity of the reference relationship for Br-pictures is reduced.
FIG. 5 is a diagram showing an example of the reference relationship of a Br-picture in the case where a constraint is placed on the reference relationship for a Br-picture. In the same manner, for example, the following constraint is placed: “A B-picture can refer to a nearest I-frame or P-frame located forward and backward in reproduction order, in the case of the progressive method; and can refer to a field pair included in the nearest I-frame or P-frame located forward and backward in reproduction order, in the case of the interlaced method. In addition, the B-picture can refer to a field pair included in the nearest Br-frame located forward or backward in reproduction order, but the number of reference pictures that can be referred to is four.    Non-Patent Reference 1: MPEG-2, H.264 (MPEG-4 AVC)
However, when the aforementioned constraints are placed, the pictures that can be referred to change depending on whether coding is performed with the current picture as a B-picture or a Br-picture, as can be seen in FIG. 4 and FIG. 5. Consequently, it follows that coding efficiency will be different depending on whether coding is performed with the current picture as a B-picture or as a Br-picture.